% !TEX TS-program = lualatex
% !TEX encoding = UTF-8
% usual packages loading:
%\usepackage{luatextra}
%\usepackage{graphicx} % support the \includegraphics command and options
\documentclass[letterpaper,12pt]{article} % use larger type; default would be 10pt

\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % or letterpaper (US) or a5paper or....
\usepackage{gregoriotex} % for gregorio score inclusion

\input{../gsp-spaces}
\usepackage[garamond]{../mypackage}
% to change the font to something better, you can install the kpfonts package (if not already installed). To do so
% go open the "TeX Live Manager" in the Menu Start->All Programs->TeX Live 2010
\setgrefactor{17}

%\def\greinitialformat#1{{\fontsize{37}{37}\selectfont #1}}
%small > footnotesize > scriptsize > tiny

%\marginsize{35pt}{35pt}{30pt}{0pt}
\usepackage{calc}
\geometry{outer=40pt,inner=40pt,top=30pt+\headsep+\headheight,bottom=30pt+\footskip}
\pagestyle{fancy} % no header or footers

\usepackage{../definepsalms}

%TODO: include versicle (just Latin)
%TODO: include at least the standard Benedicamus Domino

\newcommand{\heading}{Lucis Creator Optime.}
\def\hymninitialsize{37}
\def\hymnlinetwo{\oldstylenums{8.}}
\def\hymntex{hymn-LucisCreatorOptime2}
\def\hymninitial{L}

\def\hymntextwo{hymn-LucisCreatorOptime3}
\def\hymntwolinetwo{\oldstylenums{1.}}

\newcommand{\vrtex}{Dirigaturvr}

\newcommand{\benedicamusdominointro}{During the year and Septuagesima, Sexagesima, and Quinquagesima}
\definebenedicamusdomino{}{}


% here we begin the document
\begin{document}

\chead{\heading}

% Here we set the initial font. Change 43 if you want a bigger initial.
\def\greinitialformat#1{%
{\fontsize{\hymninitialsize}{\hymninitialsize}\selectfont #1}%
}

% We set VII above the initial.
{\def\annot{\small{Hymn.}}
\def\annottwo{\small{\hymnlinetwo}}
\setinitialspacing{\hymninitial}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

% and finally we include the score. The file must be in the same directory as this one.
\large%\vspace*{-20pt plus 20pt}
\begin{center}\addfontfeature{Numbers=Lining}\textbf{2. Another Chant (ad libitum).}\end{center}

\includescore{\hymntex}
}
\bigskip
{\greblockcustos\includescore{\vrtex}}

\emph{Magnificat}. \emph{Collect}.
\bigskip

\ifx\benedicamusdominogrefactor\undefined\else\setgrefactor{\benedicamusdominogrefactor}\fi
\ifx\benedicamusdominotex\undefined\else
\def\annot{\small{\benedicamusdominotone}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\ifx\benedicamusdominointro\undefined\else
\hspace{3ex}\emph{\benedicamusdominointro:}\\
\fi
\includescore{\benedicamusdominotex}
\ifx\benedicamusdominotexalt\undefined\else
{%
\vspace{0pt plus 12pt}
\ifx\benedicamusdominoaltintro\undefined
\def\benedicamusdominoaltintro{or}\fi
\hspace{3ex}\emph{\benedicamusdominoaltintro:}\\
\def\annot{\small{\benedicamusdominotonealt}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\greblockcustos%
\includescore{\benedicamusdominotexalt}
}
\fi
\fi

\pagebreak

{\def\annot{\small{Hymn.}}
\def\annottwo{\small{\hymntwolinetwo}}
\setinitialspacing{\hymninitial}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

% and finally we include the score. The file must be in the same directory as this one.
\large
\begin{center}\addfontfeature{Numbers=Lining}\textbf{3. Another Chant.}\end{center}

\normalsize
\includescore{\hymntextwo}
}
\bigskip
{\greblockcustos\includescore{\vrtex}}

\emph{Magnificat}. \emph{Collect}.
\bigskip

\ifx\benedicamusdominogrefactor\undefined\else\setgrefactor{\benedicamusdominogrefactor}\fi
\ifx\benedicamusdominotex\undefined\else
\def\annot{\small{\benedicamusdominotone}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\ifx\benedicamusdominointro\undefined\else
\hspace{3ex}\emph{\benedicamusdominointro:}\\
\fi
\includescore{\benedicamusdominotex}
\ifx\benedicamusdominotexalt\undefined\else
{%
\vspace{0pt plus 12pt}
\ifx\benedicamusdominoaltintro\undefined
\def\benedicamusdominoaltintro{or}\fi
\hspace{3ex}\emph{\benedicamusdominoaltintro:}\\
\def\annot{\small{\benedicamusdominotonealt}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\greblockcustos%
\includescore{\benedicamusdominotexalt}
}
\fi
\fi


\end{document}
